package com.gitee.srurl.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gitee.srurl.core.domain.SucUrlRecordDomain;
import com.gitee.srurl.core.dto.RefreshRemainRecordDTO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author zxw
 * @date 2023/4/29 13:50
 */
@Mapper
public interface SucUrlRecordMapper extends BaseMapper<SucUrlRecordDomain> {

    /**
     * 查询一天内有被访问的记录(非无限制的记录)
     *
     * @return url记录列表
     */
    List<SucUrlRecordDomain> selectRecentOneDayHadVisitRecordNonUnlimited();

    /**
     * 刷新记录的剩余次数
     *
     * @param refreshRemainRecordDTO 需要刷新的记录信息
     */
    void refreshRecordRemainTimes(RefreshRemainRecordDTO refreshRemainRecordDTO);
}
